export const getNowDate = () => {
  var date: any = new Date();
  var sign2: any = ":";
  var year: any = date.getFullYear(); // 年
  var month: any = date.getMonth() + 1; // 月
  var day: any = date.getDate(); // 日
  var hour: any = date.getHours(); // 时
  var minutes: any = date.getMinutes(); // 分
  var seconds: any = date.getSeconds(); //秒
  var weekArr: any = [
    "星期天",
    "星期一",
    "星期二",
    "星期三",
    "星期四",
    "星期五",
    "星期六",
  ];
  var week: any = weekArr[date.getDay()];
  // 给一位数的数据前面加 “0”
  if (month >= 1 && month <= 9) month = "0" + month;
  if (day >= 0 && day <= 9) day = "0" + day;
  if (hour >= 0 && hour <= 9) hour = "0" + hour;
  if (minutes >= 0 && minutes <= 9) minutes = "0" + minutes;
  if (seconds >= 0 && seconds <= 9) seconds = "0" + seconds;
  return (
    year +
    "-" +
    month +
    "-" +
    day +
    " " +
    hour +
    sign2 +
    minutes +
    sign2 +
    seconds +
    " " +
    week
  );
};
